﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/admin.master" AutoEventWireup="true" CodeFile="view.aspx.cs" Inherits="aspx_admin_tang_view" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="Server">
 福建师范大学—名师讲堂
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    分页数：<asp:DropDownList runat="server" ID="ddl分页" OnSelectedIndexChanged="ddl分页_SelectedIndexChanged" AutoPostBack="true">
        <asp:ListItem Text="5" />
        <asp:ListItem Text="10" />
        <asp:ListItem Text="15" Selected="True" />
        <asp:ListItem Text="20" />
        <asp:ListItem Text="25" />
        <asp:ListItem Text="30" />
    </asp:DropDownList>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
        DataKeyNames="讲堂ID" DataSourceID="ods讲堂动态"
        ForeColor="#333333" GridLines="None" OnRowEditing="GridView1_RowEditing"
        PageSize="16" Width="100%" OnRowDeleting="GridView1_RowDeleting">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    <asp:LinkButton Text="全选" ID="btn全选" ForeColor="White" runat="server" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="ccb选择" runat="server" ToolTip='<%# Eval("讲堂ID") %>' />
                </ItemTemplate>
            </asp:TemplateField>

            <asp:BoundField DataField="讲堂ID" HeaderText="讲堂ID" InsertVisible="False"
                ReadOnly="True" SortExpression="讲堂ID" />
            <asp:TemplateField HeaderText="标题">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("讲堂ID", "../../tang/one.aspx?id={0}") %>' OnDataBinding="HyperLink1_DataBinding1" Target="_blank" Text='<%# Eval("标题") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="时间" DataFormatString="{0:yyyy-MM-dd hh:mm}"
                HeaderText="时间" SortExpression="时间" />
            <asp:BoundField DataField="重要性" HeaderText="重要性" SortExpression="重要性"></asp:BoundField>
            <asp:CheckBoxField DataField="置顶" HeaderText="置顶" SortExpression="置顶"></asp:CheckBoxField>
            <asp:CheckBoxField DataField="新" HeaderText="新" SortExpression="新"></asp:CheckBoxField>
            <asp:CheckBoxField DataField="红字" HeaderText="红字" SortExpression="红字" />
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True"></asp:CommandField>
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    </asp:GridView>
    <table>
        <tr>
            <td>
                <asp:Button Text="设置置顶" runat="server" ID="btn置顶" OnClick="btn置顶_Click" /></td>
            <td>
                <asp:Button Text="设置new" runat="server" ID="btn新" OnClick="btn新_Click" />
            </td>

            <td>
                <asp:Button Text="设置红字" runat="server" ID="btn红字" OnClick="btn红字_Click"  />
            </td>
            <td>
                <asp:Button Text="设置重要性" runat="server" ID="btn设置重要性" OnClick="btn设置重要性_Click" />
                输入数字例如10.9<asp:TextBox runat="server" ID="txt重要性" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button Text="取消置顶" runat="server" ID="btn取消置顶" OnClick="btn取消置顶_Click" />
            </td>
            <td>
                <asp:Button Text="取消new" runat="server" ID="btn取消new" OnClick="btn取消new_Click" />
            </td>
            <td>
                <asp:Button Text="取消红字" runat="server" ID="btn取消红字" OnClick="btn取消红字_Click"  />
            </td>
            <td>
                <asp:Button Text="删除所选项" runat="server" id="btn删除所选项" OnClick="btn删除所选项_Click"/>
            </td>
        </tr>
    </table>
    <asp:ObjectDataSource ID="ods讲堂动态" runat="server" DeleteMethod="Delete"
        InsertMethod="Insert" OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetData" TypeName="ds_名师讲堂TableAdapters.tb_讲堂TableAdapter"
        UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_讲堂ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="标题" Type="String" />
            <asp:Parameter Name="主讲人" Type="String" />
            <asp:Parameter Name="时间" Type="DateTime" />
            <asp:Parameter Name="地点" Type="String" />
            <asp:Parameter Name="承办" Type="String" />
            <asp:Parameter Name="主办" Type="String" />
            <asp:Parameter Name="置顶" Type="Boolean" />
            <asp:Parameter Name="新" Type="Boolean" />
            <asp:Parameter Name="副标题" Type="String" />
            <asp:Parameter Name="全文内容" Type="String" />
            <asp:Parameter Name="红字" Type="Boolean" />
            <asp:Parameter Name="重要性" Type="Single" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="标题" Type="String" />
            <asp:Parameter Name="主讲人" Type="String" />
            <asp:Parameter Name="时间" Type="DateTime" />
            <asp:Parameter Name="地点" Type="String" />
            <asp:Parameter Name="承办" Type="String" />
            <asp:Parameter Name="主办" Type="String" />
            <asp:Parameter Name="置顶" Type="Boolean" />
            <asp:Parameter Name="新" Type="Boolean" />
            <asp:Parameter Name="副标题" Type="String" />
            <asp:Parameter Name="全文内容" Type="String" />
            <asp:Parameter Name="红字" Type="Boolean" />
            <asp:Parameter Name="重要性" Type="Single" />
            <asp:Parameter Name="Original_讲堂ID" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>